<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmSwitchButton.cpp -->
  <title>QCtmSwitchButton Class | QCustomUi 1.10.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html">QCustomUi 1.10.0</a></li>
<li><a href="index.html">QCustomUi</a></li>
<li>QCtmSwitchButton</li>
<li id="buildversion">QCustomUi 1.10.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QCtmSwitchButton Class</h1>
<!-- $$$QCtmSwitchButton-brief -->
<p>状态切换按钮. <a href="#details">More...</a></p>
<!-- @@@QCtmSwitchButton -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">  <span class="preprocessor">#include &lt;QCtmSwitchButton.h&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="https://doc.qt.io/qt/qabstractbutton.html">QAbstractButton</a></td></tr></table></div>
<ul>
<li><a href="qctmswitchbutton-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="properties">Properties</h2>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qctmswitchbutton.html#checkedBackground-prop">checkedBackground</a></b> : QBrush</li>
<li class="fn"><b><a href="qctmswitchbutton.html#checkedBackgroundBorderColor-prop">checkedBackgroundBorderColor</a></b> : QColor</li>
<li class="fn"><b><a href="qctmswitchbutton.html#checkedHandleBorderColor-prop">checkedHandleBorderColor</a></b> : QColor</li>
<li class="fn"><b><a href="qctmswitchbutton.html#checkedHandleBrush-prop">checkedHandleBrush</a></b> : QBrush</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qctmswitchbutton.html#uncheckedBackground-prop">uncheckedBackground</a></b> : QBrush</li>
<li class="fn"><b><a href="qctmswitchbutton.html#uncheckedBackgroundBorderColor-prop">uncheckedBackgroundBorderColor</a></b> : QColor</li>
<li class="fn"><b><a href="qctmswitchbutton.html#uncheckedHandleBorderColor-prop">uncheckedHandleBorderColor</a></b> : QColor</li>
<li class="fn"><b><a href="qctmswitchbutton.html#uncheckedHandleBrush-prop">uncheckedHandleBrush</a></b> : QBrush</li>
</ul>
</td></tr>
</table></div>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#QCtmSwitchButton">QCtmSwitchButton</a></b>(QWidget *<i>parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#dtor.QCtmSwitchButton">~QCtmSwitchButton</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QBrush &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#checkedBackground-prop">checkedBackground</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QColor &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#checkedBackgroundBorderColor-prop">checkedBackgroundBorderColor</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QColor &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#checkedHandleBorderColor-prop">checkedHandleBorderColor</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QBrush &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#checkedHandleBrush-prop">checkedHandleBrush</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#checkedBackground-prop">setCheckedBackground</a></b>(const QBrush &amp;<i>brush</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#checkedBackgroundBorderColor-prop">setCheckedBackgroundBorderColor</a></b>(const QColor &amp;<i>pen</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#checkedHandleBorderColor-prop">setCheckedHandleBorderColor</a></b>(const QColor &amp;<i>pen</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#checkedHandleBrush-prop">setCheckedHandleBrush</a></b>(const QBrush &amp;<i>brush</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#uncheckedBackground-prop">setUncheckedBackground</a></b>(const QBrush &amp;<i>brush</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#uncheckedBackgroundBorderColor-prop">setUncheckedBackgroundBorderColor</a></b>(const QColor &amp;<i>pen</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#uncheckedHandleBorderColor-prop">setUncheckedHandleBorderColor</a></b>(const QColor &amp;<i>pen</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#uncheckedHandleBrush-prop">setUncheckedHandleBrush</a></b>(const QBrush &amp;<i>brush</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QBrush &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#uncheckedBackground-prop">uncheckedBackground</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QColor &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#uncheckedBackgroundBorderColor-prop">uncheckedBackgroundBorderColor</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QColor &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#uncheckedHandleBorderColor-prop">uncheckedHandleBorderColor</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QBrush &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#uncheckedHandleBrush-prop">uncheckedHandleBrush</a></b>() const</td></tr>
</table></div>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#minimumSizeHint">minimumSizeHint</a></b>() const override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#paintEvent">paintEvent</a></b>(QPaintEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#resizeEvent">resizeEvent</a></b>(QResizeEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qctmswitchbutton.html#sizeHint">sizeHint</a></b>() const override</td></tr>
</table></div>
<!-- $$$QCtmSwitchButton-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
</div>
<!-- @@@QCtmSwitchButton -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$checkedBackground-prop$$$checkedBackground$$$setCheckedBackgroundconstQBrush& -->
<h3 class="fn" id="checkedBackground-prop"><span class="name">checkedBackground</span> : <span class="type"><a href="https://doc.qt.io/qt/qbrush.html">QBrush</a></span></h3>
<p>选中状态的背景画刷.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> const QBrush &amp;</td><td class="memItemRight bottomAlign"><span class="name"><b>checkedBackground</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCheckedBackground</b></span>(const QBrush &amp;<i>brush</i>)</td></tr>
</table></div>
<!-- @@@checkedBackground -->
<!-- $$$checkedBackgroundBorderColor-prop$$$checkedBackgroundBorderColor$$$setCheckedBackgroundBorderColorconstQColor& -->
<h3 class="fn" id="checkedBackgroundBorderColor-prop"><span class="name">checkedBackgroundBorderColor</span> : <span class="type"><a href="https://doc.qt.io/qt/qcolor.html">QColor</a></span></h3>
<p>选中状态的背景边框颜色.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> const QColor &amp;</td><td class="memItemRight bottomAlign"><span class="name"><b>checkedBackgroundBorderColor</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCheckedBackgroundBorderColor</b></span>(const QColor &amp;<i>pen</i>)</td></tr>
</table></div>
<!-- @@@checkedBackgroundBorderColor -->
<!-- $$$checkedHandleBorderColor-prop$$$checkedHandleBorderColor$$$setCheckedHandleBorderColorconstQColor& -->
<h3 class="fn" id="checkedHandleBorderColor-prop"><span class="name">checkedHandleBorderColor</span> : <span class="type"><a href="https://doc.qt.io/qt/qcolor.html">QColor</a></span></h3>
<p>选中状态的 handle 边框颜色.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> const QColor &amp;</td><td class="memItemRight bottomAlign"><span class="name"><b>checkedHandleBorderColor</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCheckedHandleBorderColor</b></span>(const QColor &amp;<i>pen</i>)</td></tr>
</table></div>
<!-- @@@checkedHandleBorderColor -->
<!-- $$$checkedHandleBrush-prop$$$checkedHandleBrush$$$setCheckedHandleBrushconstQBrush& -->
<h3 class="fn" id="checkedHandleBrush-prop"><span class="name">checkedHandleBrush</span> : <span class="type"><a href="https://doc.qt.io/qt/qbrush.html">QBrush</a></span></h3>
<p>选中状态的 handle 画刷.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> const QBrush &amp;</td><td class="memItemRight bottomAlign"><span class="name"><b>checkedHandleBrush</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCheckedHandleBrush</b></span>(const QBrush &amp;<i>brush</i>)</td></tr>
</table></div>
<!-- @@@checkedHandleBrush -->
<!-- $$$uncheckedBackground-prop$$$uncheckedBackground$$$setUncheckedBackgroundconstQBrush& -->
<h3 class="fn" id="uncheckedBackground-prop"><span class="name">uncheckedBackground</span> : <span class="type"><a href="https://doc.qt.io/qt/qbrush.html">QBrush</a></span></h3>
<p>未选中状态的背景画刷.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> const QBrush &amp;</td><td class="memItemRight bottomAlign"><span class="name"><b>uncheckedBackground</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setUncheckedBackground</b></span>(const QBrush &amp;<i>brush</i>)</td></tr>
</table></div>
<!-- @@@uncheckedBackground -->
<!-- $$$uncheckedBackgroundBorderColor-prop$$$uncheckedBackgroundBorderColor$$$setUncheckedBackgroundBorderColorconstQColor& -->
<h3 class="fn" id="uncheckedBackgroundBorderColor-prop"><span class="name">uncheckedBackgroundBorderColor</span> : <span class="type"><a href="https://doc.qt.io/qt/qcolor.html">QColor</a></span></h3>
<p>未选中状态的背景边框颜色.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> const QColor &amp;</td><td class="memItemRight bottomAlign"><span class="name"><b>uncheckedBackgroundBorderColor</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setUncheckedBackgroundBorderColor</b></span>(const QColor &amp;<i>pen</i>)</td></tr>
</table></div>
<!-- @@@uncheckedBackgroundBorderColor -->
<!-- $$$uncheckedHandleBorderColor-prop$$$uncheckedHandleBorderColor$$$setUncheckedHandleBorderColorconstQColor& -->
<h3 class="fn" id="uncheckedHandleBorderColor-prop"><span class="name">uncheckedHandleBorderColor</span> : <span class="type"><a href="https://doc.qt.io/qt/qcolor.html">QColor</a></span></h3>
<p>未选中状态的 handle 边框颜色.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> const QColor &amp;</td><td class="memItemRight bottomAlign"><span class="name"><b>uncheckedHandleBorderColor</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setUncheckedHandleBorderColor</b></span>(const QColor &amp;<i>pen</i>)</td></tr>
</table></div>
<!-- @@@uncheckedHandleBorderColor -->
<!-- $$$uncheckedHandleBrush-prop$$$uncheckedHandleBrush$$$setUncheckedHandleBrushconstQBrush& -->
<h3 class="fn" id="uncheckedHandleBrush-prop"><span class="name">uncheckedHandleBrush</span> : <span class="type"><a href="https://doc.qt.io/qt/qbrush.html">QBrush</a></span></h3>
<p>未选中状态的 handle 画刷.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> const QBrush &amp;</td><td class="memItemRight bottomAlign"><span class="name"><b>uncheckedHandleBrush</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setUncheckedHandleBrush</b></span>(const QBrush &amp;<i>brush</i>)</td></tr>
</table></div>
<!-- @@@uncheckedHandleBrush -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmSwitchButton[overload1]$$$QCtmSwitchButtonQWidget* -->
<h3 class="fn" id="QCtmSwitchButton">QCtmSwitchButton::<span class="name">QCtmSwitchButton</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget">QWidget</a></span> *<i>parent</i>)</h3>
<p>构造函数 <i>parent</i>.</p>
<!-- @@@QCtmSwitchButton -->
<!-- $$$~QCtmSwitchButton[overload1]$$$~QCtmSwitchButton -->
<h3 class="fn" id="dtor.QCtmSwitchButton"><code>[virtual] </code>QCtmSwitchButton::<span class="name">~QCtmSwitchButton</span>()</h3>
<p>析构函数.</p>
<!-- @@@~QCtmSwitchButton -->
<!-- $$$minimumSizeHint[overload1]$$$minimumSizeHint -->
<h3 class="fn" id="minimumSizeHint"><code>[override virtual protected] </code><span class="type"><a href="https://doc.qt.io/qt/qsize.html">QSize</a></span> QCtmSwitchButton::<span class="name">minimumSizeHint</span>() const</h3>
<p>Reimplements an access function for property: <a href="https://doc.qt.io/qt/qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>.</p>
<!-- @@@minimumSizeHint -->
<!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* -->
<h3 class="fn" id="paintEvent"><code>[override virtual protected] </code><span class="type">void</span> QCtmSwitchButton::<span class="name">paintEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qpaintevent.html">QPaintEvent</a></span> *<i>e</i>)</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qabstractbutton.html#paintEvent">QAbstractButton::paintEvent</a>(QPaintEvent *e).</p>
<!-- @@@paintEvent -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn" id="resizeEvent"><code>[override virtual protected] </code><span class="type">void</span> QCtmSwitchButton::<span class="name">resizeEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qresizeevent.html">QResizeEvent</a></span> *<i>event</i>)</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qwidget.html#resizeEvent">QWidget::resizeEvent</a>(QResizeEvent *event).</p>
<!-- @@@resizeEvent -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn" id="sizeHint"><code>[override virtual protected] </code><span class="type"><a href="https://doc.qt.io/qt/qsize.html">QSize</a></span> QCtmSwitchButton::<span class="name">sizeHint</span>() const</h3>
<p>Reimplements an access function for property: <a href="https://doc.qt.io/qt/qwidget.html#sizeHint-prop">QWidget::sizeHint</a>.</p>
<!-- @@@sizeHint -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
